home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Sorting algorithm - In search of
- Date: 4 Mar 1996 11:07:04 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4hff0pINN9f4@keats.ugrad.cs.ubc.ca>
- References: <4h4jmq$3bh@news.cis.nctu.edu.tw> <4h6glr$ab6@utrhcs.cs.utwente.nl> <4hat5g$bdq@fohnix.metronet.com> <4hd557$ai2@garden.csc.calpoly.edu>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <4hd557$ai2@garden.csc.calpoly.edu>,
- Dan Stubbs <dstubbs@garden.csc.calpoly.edu> wrote:
- >I agree with the comment about qsort. I many cases it is the sort technique
- >of choice. However, there may be cases in which qsort is not the best. The
- >question here concerns sorting an array of floats. It is probably possible
- >to implement quicksort specifically for an array of floats so that it is
- >faster than the (generic) qsort. If sorting the array of floats is frequent
- >and time consuming it is no doubt worth comparing qsort with good
- >implementations that are hard wired for the specific problem at hand.
-
- Who says that qsort() necessarily uses the quicksort agorithm?
-
- >Further, some implementations of qsort do not perform well for certain
-
- You surely mean ``of quicksort''. qsort() is a standard C function that is
- unrelated to the quicksort algorithm.
-
- Does the standard require that qsort() be an incarnation of Hoare's quicksort?
-
- >initial distributions of the data to sort. If you have such a case, then
- >you need to replace qsort with another implementation of quicksort that
- >is efficient for your initial distribution.
- >
- >For the occasional sort application, by all means, use qsort. For production
- >sort problems test qsort to make sure it provides the performance you need.
-
- You can't test qsort(), you can only test particular implementations of it.
- --
-
-